<script>
	import { usePiniaStore } from '@/store/pinia.js'

	export default {
		onLaunch: function() {
			const Pinia = usePiniaStore();
			const info = uni.getSystemInfoSync();
			Pinia.$patch((state) => {
				state.System = info;
			})

			// #ifdef MP-WEIXIN
			const menuBut = uni.getMenuButtonBoundingClientRect();
			const Bar = menuBut.height + (menuBut.top - info.statusBarHeight) * 2;
			Pinia.$patch((state) => {
				state.menuBut = menuBut;
				state.menWidth = menuBut.width;
				state.BarHeight = Bar;
				state.totalHeight = Bar + info.statusBarHeight;
			})

			// #endif

		},
		onShow: function() {},
		onHide: function() {}
	}
</script>

<style lang="scss">
	@import "uview-plus/index.scss";
	@import url(@/static/css/main.css);
	@import url(@/static/css/iconfont.css);

	page {
		background-color: $pageBg;
	}
</style>